<template>
	<view>
		<!-- 状态栏高度 设置背景色 占位状态栏-->
		<view class="ztl"
			:style="{'height':statusBarHeight}"></view>
		<!-- 占位盒子 -->
		<view class=""
			:style="{'height': height}"></view>
		<!-- 导航栏 -->
		<navBar bgColor="#FFF">
			<image :slot="'left'"
				@click="navToBack"
				:src="xcxImgUrl && xcxImgUrl+'fanhui.svg'"
				style="width: 36rpx;height: 36rpx;"></image>
			<text :slot="'content'">关于我们</text>
		</navBar>
		
		<view class="main_about" :style="{'height': 'calc(100vh - ' + demoTopHieght +')'}">
			<view class="main_about_top">
				<image :src="xcxImgUrl && xcxImgUrl+'page_setting/static/about.png'"></image>
				<text class="mt10">版本号：{{aboutInfo && aboutInfo.version || ''}}</text>
			</view>
			<view class="main_about_btn">
				<view class="" >
					服务热线：
					<text style="color: red;">400-189-9-189</text>
				</view>
				<!-- <view class="">
					《
					<text style="color: #F33340;">用户服务协议</text>
					》
					和《
					<text style="color: #F33340;">隐私协议</text>
					》
				</view> -->
				<!-- <text>Copyright © 1997 - 2021 by the zhuiyun</text> -->
			</view>
		</view>
	</view>
</template>

<script>
	import {getMallSoftwareEdition} from '@/api/global.js'
	import {
		mapGetters
	} from 'vuex'
	export default {
		computed: {
			...mapGetters(['demoTopHieght']),
		},
		data() {
			return {
				statusBarHeight:'',
				height:'',
				aboutInfo:''
			};
		},
		onLoad() {
			//获取关于信息
			this.getAbout()
		},
		onShow() {
			this.$nextTick(() => {
				// 获取状态栏的高度
				this.statusBarHeight = this.$store.state.statusBarHeight * 2 + 'rpx'
				// 计算站位的高度
				this.height = (this.$store.state.navBarHeight) * 2 + 'rpx'
				//获取高度
				this.Utils.getDemoTopHeight('main_about')
			})
		},
		methods:{
			navToBack(){
				uni.navigateBack()
			},
			//获取
			async getAbout(){
				let res = await getMallSoftwareEdition({
					bussinessId:this.$store.state.bussinessId
				})
				if(res.code == 2000){
					this.aboutInfo = res?.data?.info?.softwareEdition
				}else{
					this.Utils.toast(`${res.msg}`)
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main_about{
		width: 100%;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-evenly;
		.main_about_top{
			width: 300rpx;
			display:flex;
			flex-direction: column;
			align-items: center;
			
			image{
				width: 192rpx;
				height: 212rpx;
			}
			text{
				color: $text_color_333;
				font-size: $font_size_12;
			}
		}
		
		.main_about_btn{
			display:flex;
			flex-direction: column;
			align-items: center;
			color: $text_color_808080;
			font-size: $font_size_12;
		}
	}

</style>
